package org.jetlinks.pro.things.impl.connector;

import org.jetlinks.core.message.ThingMessage;
import org.jetlinks.core.things.MetadataId;
import org.jetlinks.core.things.ThingId;
import org.jetlinks.core.things.ThingRpcSupport;
import reactor.core.Disposable;
import reactor.core.Disposables;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.function.Function;

public class DoNotingThingsConnector extends AbstractThingsConnector implements ThingRpcSupport {

    @Override
    protected void onDispose() {

    }

    @Override
    protected Disposable doConnectTo(MetadataId metadataId, Function<ThingMessage, Mono<Void>> handler) {
        return Disposables.disposed();
    }

    @Override
    protected Disposable doConnectTo(ThingId thingId, MetadataId metadataId, Function<ThingMessage, Mono<Void>> handler) {
        return Disposables.disposed();
    }

    @Override
    public Flux<? extends ThingMessage> call(ThingMessage message) {
        return Flux.empty();
    }
}
